﻿#ifndef XQPUSHSERVER_H
#define XQPUSHSERVER_H
#include"XQHttpServer.h"
#include"XQHead.h"
class XQPushReply;
class XQHttpReplyAccount;
class XQPushServer:public XQHttpServer
{
	Q_OBJECT
public:
	XQPushServer(QObject* parent = nullptr);
	XQMySql* userMysql()const;
	XQMySql* appMysql()const;
	XQMail* mail()const;
	QString name()const;
public:
	//userMysql使用appMysql
	void userMysqlBridgingToAppMysql();
	//userMysql新建与appMysql分离
	void userMysql_Create();
	//设置名字
	void setName(const QString&name);
signals:
	/*void errorInfo(const QString&text);*/
protected:
	void init();
	void mail_init();
	void account_init();
	void push_init();
protected:
	QString m_name;//名字
	XQMySql* m_userMysql = nullptr;
	XQMySql* m_appMysql = nullptr;
	XQPushReply* m_push=nullptr;
	XQHttpReplyAccount* m_account = nullptr;
	XQMail* m_mail = nullptr;
};
#endif // !XQPushServer
